package com.djl.sqtg.service.impl;

import com.djl.sqtg.entity.*;
import com.djl.sqtg.mapper.GoodsMapper;
import com.djl.sqtg.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class GoodsServiceImpl implements IGoodsService {
    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public List<Goods> getAllGoods() {
        return goodsMapper.getAllGoods();
    }

    @Override
    public List<LightDeals> getLightdealsGoods() {
        return goodsMapper.getLightdealsGoods();
    }

    @Override
    public List<Goods> getHotGoods() {
        return goodsMapper.getHotGoods();
    }

    @Override
    public List<Goods> getMarketingstatusGoods() {
        return goodsMapper.getMarketingstatusGoods();
    }

    @Override
    public List<Goods> getGoodsByKey(String key) {
        return goodsMapper.getGoodsByKey(key);
    }

    @Override
    public Goods getGoodsById(Integer gid) {
        return goodsMapper.getGoodsById(gid);
    }

    @Override
    public Integer addUserClick(Integer uid, Integer gid) { return goodsMapper.addUserClick(uid,gid);}

    @Override
    public Integer addUserClickNum(Integer uid, Integer gid,Integer click) {return goodsMapper.addUserClickNum(uid,gid,click);}

    @Override
    public Integer getUserClickNumByUidGid(Integer uid, Integer gid) { return goodsMapper.getUserClickNumByUidGid(uid,gid);}

    @Override
    public List<ItemCF> getAllItemCF() {return goodsMapper.getAllItemCF();}

    @Override
    public List<Goods> getAllGoodsByIds(List<Long> Gids) {return goodsMapper.getAllGoodsByIds(Gids);}

    @Override
    public Integer getAllGoodsNum() {
        return goodsMapper.getAllGoodsNum();
    }

    @Override
    public Integer getGoodsBySearchNum(String keyword) {
        return goodsMapper.getGoodsBySearchNum(keyword);
    }

    @Override
    public List<Goods> goodsSoldTop() {return goodsMapper.goodsSoldTop();}

    @Override
    public List<Goods> getGoodsByPageNum(Integer pageNum, Integer pageSize) {
        return goodsMapper.getGoodsByPageNum(pageNum,pageSize);
    }

    @Override
    public List<Goods> getGoodsBySearch(String keyword, Integer pageNum, Integer pageSize) {
        return goodsMapper.getGoodsBySearch(keyword,pageNum,pageSize);
    }

    @Override
    public String getCosDirectory(Integer gcid) {
        return goodsMapper.getCosDirectory(gcid);
    }

    @Override
    public Integer addGoods(Goods goods) {
        return goodsMapper.addGoods(goods);
    }

    @Override
    public Integer delGoodsByGid(Integer gid) {
        return goodsMapper.delGoodsByGid(gid);
    }

    @Override
    public Integer delManyGoods(Integer[] gids) {
        return goodsMapper.delManyGoods(gids);
    }

    @Override
    public List<GoodsSales> getTodayHotGoods(String date) {
        return goodsMapper.getTodayHotGoods(date);
    }

    @Override
    public List<GoodsSales> getGoodsMoneyRank(String date) {
        return goodsMapper.getGoodsMoneyRank(date);
    }

    @Override
    public Integer goodsNum() {
        return goodsMapper.goodsNum();
    }

    @Override
    public List<GoodsSales> getTMGoodsNumRank(String[] date) {
        return goodsMapper.getTMGoodsNumRank(date);
    }

    @Override
    public List<GoodsSales> getTMGoodsMoneyRank(String[] date) {
        return goodsMapper.getTMGoodsMoneyRank(date);
    }

    @Override
    public List<GoodsSales> getGoodsNumTimePeriod(String startDate, String endDate) {
        return goodsMapper.getGoodsNumTimePeriod(startDate,endDate);
    }

    @Override
    public List<GoodsSales> getGoodsMoneyRankTimePeriod(String startDate, String endDate) {
        return goodsMapper.getGoodsMoneyRankTimePeriod(startDate,endDate);
    }

    @Override
    public List<Review> getGoodsReview(Integer gid) {
        return goodsMapper.getGoodsReview(gid);
    }

    @Override
    public Integer updateGoodsState(Integer gid, Integer goodsstate) {
        return goodsMapper.updateGoodsState(gid,goodsstate);
    }

}
